using System;
using System.Collections.Generic;
using System.Text;
using OgilvyOne.DALFactory;
using OgilvyOne.IDAL;
using OgilvyOne.Model;
using System.Web.UI;
using System.Collections;
using System.Web.UI.WebControls;


namespace OgilvyOne.BLL
{
    public class SysMenu:Tree
    {
        // Methods
        public void Delete(int iNodeID)
        {
            OgilvyOne.DALFactory.SysMenu.Create().DeleteMenu(iNodeID);
        }

        public int GetChildIDCount(int menu_uid)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().GetChildIDCount(menu_uid);
        }

        public IList getChildNodeList(string isdel, int parent_node_id)
        {
            return OgilvyOne.DALFactory.Tree.MenuCreate().getChildNodeList(isdel, parent_node_id);
        }

        public IList getCurrMenuNode(int nodeid)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().getMenuNode(nodeid);
        }

        public string getCurrMenuTree(int Menu_UID, string page_name, string getENType)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().getCurrMenuTree(Menu_UID, page_name, getENType);
        }

        public IList getCurrNode(string isdel, int nodeid)
        {
            return OgilvyOne.DALFactory.Tree.MenuCreate().getCurrNode(nodeid);
        }

        public IList getDir_List(int DirID)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().getDir_List(DirID);
        }

        public int getLeftMenuParentID(int menu_uid)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().getLeftMenuParentID(menu_uid);
        }

        public IList getMenu_idList(int Menu_UID)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().getMenu_idList(Menu_UID);
        }

        public int getMenuCount(string sValid)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().getMenuCount(sValid);
        }

        public int getRootID(int menu_uid)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().getRootID(menu_uid);
        }

        public int getRootID(int menu_uid, int CurrDirID)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().getRootID(menu_uid, CurrDirID);
        }

        public int getRootID(int menu_uid, string getENType)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().getRootID(menu_uid, getENType);
        }

        public void Insert(SysMenuInfo iinfo)
        {
            OgilvyOne.DALFactory.SysMenu.Create().InsertMenu(iinfo);
        }

        public string ListDir1(int DirID, string page_name)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().ListDir1(DirID, page_name);
        }

        public int Select(string menu_name)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().Select(menu_name);
        }

        public void Update(SysMenuInfo iinfo)
        {
            OgilvyOne.DALFactory.SysMenu.Create().ModifyMenu(iinfo);
        }

        public IList GetAllMenuOther(int menu_id)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().GetAllMenuOther(menu_id);
        }

        public bool ModifyByIdentity(SysMenuInfo data)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().ModifyByIdentity(data);
        }
        public int ParentID(string menu_name)
        {
            return OgilvyOne.DALFactory.SysMenu.Create().ParentID(menu_name);
        }

    }
}
